﻿<?xml version="1.0" encoding="utf-8" ?>
<!-- 
/* **********************************************************************************
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* This source code is subject to terms and conditions of the Shared Source License
* for DSL Editor PowerToy. A copy of the license can be found in the License.htm file
* at the root of this distribution. If you can not locate the Shared Source License
* for DSL Editor PowerToy, please obtain a copy from: http://www.codeplex.com/dsltreegrideditor/Project/License.aspx.
* By using this source code in any fashion, you are agreeing to be bound by
* the terms of the Shared Source License for DSL Editor PowerToy.
*
* You must not remove this notice, or any other, from this software.
*
* **********************************************************************************/
-->
<Recipe Name="RemoveFromDSLSolution" Recurrent="true" Bound="false" xmlns="http://schemas.microsoft.com/pag/gax-core" xmlns:xi="http://www.w3.org/2001/XInclude">
  <DocumentationLinks>
    <Link Caption="What does this recipe do?" Url="http://www.codeplex.com/dsltreegrideditor/Wiki/View.aspx?title=ReleaseM1_Recipe_RemoveFromDSLSolution" Kind="Documentation"/>
  </DocumentationLinks>
  <xi:include href="Common/CommonTypeAliases.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
  <Caption>Remove DSL Editors</Caption>
  <HostData>
    <Icon ID="214" />
    <CommandBar Name="Project" />
  </HostData>
  <Arguments>
    <Argument Name="DslPackageProject" Type="EnvDTEProject">
      <ValueProvider Type="FirstSelectedProjectValueProvider" />
    </Argument>
    <Argument Name="FullDestFolderPath" Type="System.String">
      <Converter Type="ProjectItemExistsConverter" ItemType="Folder" ProjectArgument="DslPackageProject"/>
      <ValueProvider Type="ProjectItemFromProjectGlobalsValueProvider" 
         ProjectArgument="DslPackageProject" ItemType="Folder" PropertyName="DSLPowerEditorToyEditor_AddedFolder">
        <MonitorArgument Name="DslPackageProject" />
      </ValueProvider>
    </Argument>
    <xi:include href="Common/Arguments/Paths.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Arguments/gax:Argument)" />
    <Argument Name="CtcFilePath" Type="System.String">
      <Converter Type="ProjectItemExistsConverter" ItemType="File" ProjectArgument="DslPackageProject"/>
      <ValueProvider Type="ProjectItemFromProjectGlobalsValueProvider" 
         ProjectArgument="DslPackageProject" ItemType="File" PropertyName="DSLPowerEditorToyEditor_CtcFile">
        <MonitorArgument Name="DslPackageProject" />
      </ValueProvider>
    </Argument>
  </Arguments>
  <GatheringServiceData>
    <Wizard xmlns="http://schemas.microsoft.com/pag/gax-wizards" SchemaVersion="1.0">
      <Pages>
        <Page Height="300">
          <Title>Removal Configuration</Title>
          <Fields>
            <Field ValueName="FullDestFolderPath" Label="Added Folder">
              <Help>Folder containing added files. (i.e. 'DslEditors')  Note, only added files in this folder will be removed.</Help>
            </Field>
            <Field ValueName="CtcFilePath" Label="Path to .ctc File">
              <Help>Enter the path to the project CTC file. (i.e. 'CtcComponents\Commands.ctc')</Help>
            </Field>
          </Fields>
        </Page>
      </Pages>
    </Wizard>
  </GatheringServiceData>
  <Actions>
    <Action Name="Trace0" Type="WriteTraceAction" Pane="Package" Message="Starting configuration removal on: '$(DslPackageProject.Name)'"/>

    <!-- Cleanup -->
    <xi:include href="Common/Actions/Cleanup.xml" xpointer="xmlns(gax=http://schemas.microsoft.com/pag/gax-core) xpointer(/gax:Actions/gax:Action)" />

    <!-- Re-register package runtime information
    <Action Name="ReRegisterPackage" Type="RegisterVsPackageProjectAction"
            Action="Register">
      <Input Name="PackageProject" RecipeArgument="DslPackageProject" />
    </Action>  -->
    
    <Action Name="Trace1" Type="WriteTraceAction" Pane="Package" Message="Configuration removal complete."/>
  </Actions>
</Recipe>
